package org.yzh.web.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "jt-server")
@Data
public class JtServerConfig {

    private String ip;
    private Jt808Properties jt808;
    private AlarmFileProperties alarmFile;

    @Data
    public static class Jt808Properties {
        private boolean enable;
        private Ports ports;
        private MediaFileProperties mediaFile;

        @Data
        public static class Ports {
            private Integer udp;
            private Integer tcp;
        }

        @Data
        public static class MediaFileProperties {
            private String path;
        }


    }

    @Data
    public static class AlarmFileProperties {
        private Boolean enable;
        private Integer port;
        private String path;
    }


}
